package com.donfu.system.domain.dto;

import com.donfu.common.annotation.Excel;
import com.donfu.system.domain.house.HouseProductType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 商品分类对象DTO
 */
@Data
public class HouseProductTypeDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 主键Id */
    private Long id;

    /** 父产品Id 默认为0 是一级ID */
    @Excel(name = "父产品Id 默认为0 是一级ID")
    private Long pid;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 产品图标 */
    @Excel(name = "产品图标")
    private String productIconUrl;

    /** 产品图片 */
    @Excel(name = "产品图片")
    private String productImgUrl;

    /** 是否首页 1是 0否 */
    @Excel(name = "是否首页 1是 0否")
    private Integer isIndex;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    /** 分类层级 */
    @Excel(name = "分类层级")
    private Integer level;

    /** 分类子级集合 */
    private List<HouseProductTypeDTO> children;

    public List<HouseProductTypeDTO> getChildren() {
        return children;
    }

    public void setChildren(List<HouseProductTypeDTO> children) {
        this.children = children;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setPid(Long pid)
    {
        this.pid = pid;
    }

    public Long getPid()
    {
        return pid;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }
    public void setProductIconUrl(String productIconUrl)
    {
        this.productIconUrl = productIconUrl;
    }

    public String getProductIconUrl()
    {
        return productIconUrl;
    }
    public void setProductImgUrl(String productImgUrl)
    {
        this.productImgUrl = productImgUrl;
    }

    public String getProductImgUrl()
    {
        return productImgUrl;
    }
    public void setIsIndex(Integer isIndex)
    {
        this.isIndex = isIndex;
    }

    public Integer getIsIndex()
    {
        return isIndex;
    }
    public void setSort(Integer sort)
    {
        this.sort = sort;
    }

    public Integer getSort()
    {
        return sort;
    }
    public void setLevel(Integer level)
    {
        this.level = level;
    }

    public Integer getLevel()
    {
        return level;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("pid", getPid())
                .append("productName", getProductName())
                .append("productIconUrl", getProductIconUrl())
                .append("productImgUrl", getProductImgUrl())
                .append("isIndex", getIsIndex())
                .append("sort", getSort())
                .append("level", getLevel())
                .toString();
    }

}
